/**
 * org.assess.oa.system.dao.impl.TbMenuDAOImpl
 */
package org.assess.oa.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.assess.core.dao.BaseDAOImpl;
import org.assess.oa.system.bean.TbMenu;
import org.assess.oa.system.dao.TbMenuDAO;

/**
 * @description 操作菜单表的DAO层实现类
 * @author XiaLongxiang
 * @createtime 2012-6-5 上午9:31:02
 */
public class TbMenuDAOImpl extends BaseDAOImpl<TbMenu> implements TbMenuDAO {
    public TbMenu queryTbMenuById(String menu_id) {
        return (TbMenu) sqlClient.queryForObject("queryTbMenuById", menu_id);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenu> queryTbMenuAsList(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuAsList", parameters);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenu> queryTbMenuAsPermissionList(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuAsPermissionList", parameters);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenu> queryTbMenuAsListByStartProir(String menu_id) {
        return sqlClient.queryForList("queryTbMenuAsListByStartProir", menu_id);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenu> queryTbMenuAsListByUserAndSystem(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuAsListByUserAndSystem", parameters);
    }
    
    public boolean deleteTbMenuById(String menu_id) {
        sqlClient.delete("deleteTbMenuById", menu_id);
        return true;
    }
}
